With the development of network technologies, search engines have been continuously improved and various information may be obtained from the Internet through the search engines. The search engines become one of the main methods to help a user to quickly obtain information at the Internet. A user submits a query term (Query) to a search engine, and the search engine returns search results corresponding to the query to the user.
At an e-commerce website, more particularly at a large e-commerce website, the user usually needs to use the query to search and find his/her desired products. As queries input by the user are usually formed according to a desire of the user, it may result in more or less results corresponding to the queries, thereby resulting in a low accuracy of the search results and frequent searches. Thus, the search engine may usually expand or rewrite the queries to enrich query information and optimize the queries input by the user intelligently, thereby improving the accuracy of the search results and simultaneously reducing pressure brought to a server due to frequent searches by the user.
Conventional query expansion methods include expansion at a query end and an index end. Expansion at the query end mainly includes addition, substitution, and deletion of the query. That is, a certain character or a certain part is added, substituted or deleted from the query input by the user. For example, if the query input by the user is “Nokia™ mobile phone,” an adding operation may apply to the query to change it into “Nokia™ N95 mobile phone,” a deleting operation may apply to the query to change it into “Nokia™” or “Mobile phone,” or a substituting operation may apply to the query to change it into “Samsung™ mobile phone” or “Apple™ mobile phone,” etc. Expansion at the index end mainly refers to synonym expansion of the query at the index end. A synonym set is usually obtained through conventional data mining. When a certain term appears, its synonyms are extracted from the synonym set for expansion. In order to ensure the accuracy of the search results and the query, a simultaneous expansion at the query end and the index end may be adopted. In other words, the query is expanded at both the query end and the index end respectively, and a result corresponding to the same expansion terms is selected as an expansion result.
During practical processing, the search engine may usually select the expansion terms at the query end one by one for searching according to a certain sequence, match the expansion terms with expansion terms at the index end, and return search results of the expansion terms if there is a match between the expansion terms. During this process, it is possible that there are multiple expansion terms at the query end while there is only an expansion term at the index end. Thus, according to the sequence, the last expansion term at the query end matches the query term at the index end. The search engine needs to search multiple times until the last expansion term at the query end matches the expansion term at the index end. Therefore, invalid search times of the search engine as well as time for a system to return the search results are increased, the system response speed is reduced, and system resource occupancy is increased.